package com.mydemo.thread;

import java.util.concurrent.*;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: CallTest, v1.0 2019-09-17 14:08 liming1 Exp $
 */
public class CallTest {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ExecutorService executorService = Executors.newFixedThreadPool(2);
        Future t1 = executorService.submit(new CallThread("T1"));
        long start = System.currentTimeMillis();
        int count = 0;
        while (!t1.isDone()){
            count ++ ;
            System.out.println("循环执行完毕");
        }
        System.out.println(count);
        System.out.println("结束：" + (System.currentTimeMillis() - start));
    }
}
